﻿<UserControl x:Class="Studio77.GuessTheWords2.Views.StageItemView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    Height="96" Width="421">
    <UserControl.Resources>
    	<Style x:Key="ButtonStyle1" TargetType="Button">
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="Button">
    					<Grid>
    						<VisualStateManager.VisualStateGroups>
    							<VisualStateGroup x:Name="CommonStates">
    								<VisualState x:Name="Pressed">
    									<Storyboard>
    										<DoubleAnimation Duration="0" To="1.03" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="image" d:IsOptimized="True"/>
    										<DoubleAnimation Duration="0" To="1.03" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="image" d:IsOptimized="True"/>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Normal"/>
    								<VisualState x:Name="Disabled"/>
    								<VisualState x:Name="MouseOver"/>
    							</VisualStateGroup>
    							<VisualStateGroup x:Name="FocusStates">
    								<VisualState x:Name="Focused"/>
    							</VisualStateGroup>
    						</VisualStateManager.VisualStateGroups>
    						<Image x:Name="image" Source="/Images/stage_block.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
    							<Image.RenderTransform>
    								<CompositeTransform/>
    							</Image.RenderTransform>
    						</Image>
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="83"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Button Grid.ColumnSpan="2" Content="Button" HorizontalAlignment="Center" Height="96" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Center" Width="421" Click="Button_Click_1"/>
        <TextBlock x:Name="txtComplete"  Grid.Column="1" HorizontalAlignment="Left" Margin="78,0,0,20" TextWrapping="Wrap" Text="{Binding CompleteCount}" VerticalAlignment="Bottom" Foreground="White" FontSize="18.667" IsHitTestVisible="False"/>
        <TextBlock x:Name="txtTime" Grid.Column="1" Margin="199,0,0,20" TextWrapping="Wrap" Text="{Binding GameTime}" VerticalAlignment="Bottom" Foreground="White" FontSize="18.667" HorizontalAlignment="Left" IsHitTestVisible="False"/>
        <TextBlock x:Name="txtScore" Grid.Column="1" Margin="200,10,0,0" TextWrapping="Wrap" Text="{Binding Score}" VerticalAlignment="Top" Foreground="#FFFF9800" FontFamily="Segoe WP Semibold" FontSize="24" HorizontalAlignment="Left" IsHitTestVisible="False"/>
        <Image Height="30" Visibility="{Binding OneStarVisibility}" Margin="37,10,0,0" Source="/Images/one_star.png" Stretch="Fill" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Left" Width="120" IsHitTestVisible="False"/>
        <Image Height="30" Visibility="{Binding NoStarVisibility}" Margin="37,10,0,0" Source="/Images/no_star.png" Stretch="Fill" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Left" Width="120" IsHitTestVisible="False"/>
        <Image Height="30" Visibility="{Binding TwoStarVisibility}" Margin="37,10,0,0" Source="/Images/two_star.png" Stretch="Fill" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Left" Width="120" IsHitTestVisible="False"/>
        <Image Height="30" Visibility="{Binding ThreeStarVisibility}" Margin="37,10,0,0" Source="/Images/three_star.png" Stretch="Fill" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Left" Width="120" IsHitTestVisible="False"/>
        <Image Height="96" Visibility="{Binding LockVisibility}" Source="/Images/stage_block_locked.png" Stretch="Fill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="421" Grid.ColumnSpan="2" d:IsHidden="True"/>
        <TextBlock x:Name="txtStageIndex" TextWrapping="Wrap" Text="{Binding Index}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black" FontSize="37.333" FontFamily="Segoe WP Black" IsHitTestVisible="False" Margin="10,19,0,27"/>

    </Grid>
</UserControl>